#ifndef WIDGET_H
#define WIDGET_H

#include <QWidget>
#include <QColor>
#include <QLabel>
#include <QPaintEvent>
#include <QPainter>
#include <QClipboard>


QT_BEGIN_NAMESPACE
namespace Ui {
class Ui_Widget;
}
QT_END_NAMESPACE

class ColorLabel : public QLabel
{
    Q_OBJECT
public:
    using QLabel::QLabel;
public slots:
    void setBackgroundkColor(const QColor& color);
protected:
    void paintEvent(QPaintEvent* event)override;
private:
    QColor bk{0,0,0,0};
};

class Widget : public QWidget
{
    Q_OBJECT

public:
    Widget(QWidget *parent = nullptr);
    ~Widget();

private:
    Ui::Ui_Widget *ui;
    void connectSingls();
    // 正向叠加色计算
    QColor superpositionColorComputation(const QColor& upper,const QColor& under);
};
#endif // WIDGET_H
